package com.airticketbooking.mapper;

import com.airticketbooking.dto.OrderDTO;
import com.airticketbooking.po.Order;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.joda.time.DateTime;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;



@Mapper
public interface OrderMapper {
	@Select("SELECT * FROM airticketbooking.order WHERE `order`.order_id = #{orderId}")
	Order getOrderById(Integer orderId);

	List<Order> querylist(OrderDTO orderDTO);


	void addOrder(Order order);

	void modifyOrder(Order order);


	@Select("SELECT * FROM airticketbooking.order WHERE `order`.user_id = #{userId}")
	List<Order> getByUserId(Integer userId);


	@Select("SELECT * FROM airticketbooking.order")
	List<Order> getAll();

	List<Order> ordersWhichcompletedInRangeTime(DateTime startTime, DateTime endTime);


}
